package com.kkang.ch2.prepost;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import javax.annotation.PreDestroy;

/**
 * @author yongk_liu
 **/
public class Main {

    public static void main(String[] args){
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(PrePostConfig.class);
        PrePostConfig prePostConfig = applicationContext.getBean(PrePostConfig.class);
        //bean直接指定java的方法
        prePostConfig.beanWayService();
        //jsr250注解直接声明的方法
        prePostConfig.jsr250WayService();
        applicationContext.close();
    }

}
